using System.Collections.Generic;

namespace SmartMathLibrary.Geometry
{
    /// <summary>
    /// An interface to implement a Polyline2D.
    /// </summary>
    public interface IPolyline2D
    {
        /// <summary>
        /// Gets or sets the line data of the polyline.
        /// </summary>
        /// <value>The line data of the polyline.</value>
        List<Point2D> LineData { get; set; }

        /// <summary>
        /// Checks if the polyline has a closed or open geometry.
        /// </summary>
        /// <returns>
        /// 	<c>true</c> if this polyline is closed; otherwise, <c>false</c>.
        /// </returns>
        bool IsClosed();

        /// <summary>
        /// Adds the point to the polyline.
        /// </summary>
        /// <param name="point">The point which should be added to the polyline.</param>
        void AddPoint(Point2D point);

        /// <summary>
        /// Gets a point of the polyline at a specified position.
        /// </summary>
        /// <param name="index">The position of the point in the datalist.</param>
        /// <returns>A point of the polyline at a specified position.</returns>
        Point2D GetPoint(int index);

        /// <summary>
        /// Gets the number of line points.
        /// </summary>
        /// <returns>The number of line points.</returns>
        int GetNumberOfPoints();

        /// <summary>
        /// Deletes the point which is placed at a specified position.
        /// </summary>
        /// <param name="index">The specified index position.</param>
        void DeletePoint(int index);

        /// <summary>
        /// Deletes all points of the polyline which are even to the compareparameter.
        /// </summary>
        /// <param name="point">The point to compare for removing points from the polyline.</param>
        void DeletePoint(Point2D point);

        /// <summary>
        /// Scales every point in the polyline to a specified factor.
        /// </summary>
        /// <param name="scaleFactor">The scale factor.</param>
        void ScalePolyLine(double scaleFactor);

        /// <summary>
        /// Scales every point in the polyline to a specified factor.
        /// </summary>
        /// <param name="scaleFactorX">The scale factor for the x element.</param>
        /// <param name="scaleFactorY">The scale factor for the y element.</param>
        void ScalePolyLine(double scaleFactorX, double scaleFactorY);

        /// <summary>
        /// Translates the polyline with a specified value.
        /// </summary>
        /// <param name="translateValue">The translate value.</param>
        void TranslatePolyLine(double translateValue);

        /// <summary>
        /// Translates the polyline with a specified value.
        /// </summary>
        /// <param name="translateValueX">The translate value for the x element.</param>
        /// <param name="translateValueY">The translate value for the y element.</param>
        void TranslatePolyLine(double translateValueX, double translateValueY);

        /// <summary>
        /// Compares the current instance of a polyline with another polyline object. 
        /// </summary>
        /// <param name="compare">The line to compare.</param>
        /// <returns>True if the position of the polylines are even otherwise the method will 
        /// return false.</returns>
        bool CompareTo(Polyline2D compare);
    }
}